<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
<link href="/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css" th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal" id="form-do-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">卖出订单:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="sellPurchaseId"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">订单:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="purchaseId"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="ownName"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="purchaseType"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="uninPricee"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="sumPrice"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">订单收货地址:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="address"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="purchaseStatus"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="updateTime"></div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">:</label>
            <div class="col-sm-8"><input class="form-control" type="text" name="orderId"></div>
        </div>
        <div class="form-group">
            <div class="form-control-static col-sm-offset-9">
                <button type="button" class="btn btn-primary" onclick="addDoSave()">提交</button>
                <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    layui.use('laydate', function () {
        var laydate = layui.laydate;//时间选择器
        laydate.render({
            elem: '#inDate', type: 'date'
        });
    });

    var prefix = "/tbSellPurchase"
    function addDoSave() {
        $.ajax({
            cache: true,
            type: "POST",
            url: prefix+"/addSave",
            data: {
                sellPurchaseId: $("input[name='sellPurchaseId']").val(),
                purchaseId: $("input[name='purchaseId']").val(),
                ownName: $("input[name='ownName']").val(),
                purchaseType: $("input[name='purchaseType']").val(),
                uninPricee: $("input[name='uninPricee']").val(),
                sumPrice: $("input[name='sumPrice']").val(),
                address: $("input[name='address']").val(),
                purchaseStatus: $("input[name='purchaseStatus']").val(),
                createTime: $("input[name='createTime']").val(),
                updateTime: $("input[name='updateTime']").val(),
                orderId: $("input[name='orderId']").val(),
            },
            async: false,
            traditional: true,
            error: function (request) {
                $.modal.alertError("系统错误");
            },
            success: function (data) {
                $.operate.saveSuccess(data);
            }
        });
    }
</script>
</body>
</html>